package com.zz.inventory.service;

import java.util.List;
import java.util.Map;

import com.zz.inventory.domain.FranchiseBills;
import com.zz.inventory.domain.FranchisePackages;

/**
 * 账单Service接口
 * 
 * @author zz
 * @date 2025-07-03
 */
public interface IFranchiseBillsService 
{
    /**
     * 查询账单
     * 
     * @param billId 账单主键
     * @return 账单
     */
    public FranchiseBills selectFranchiseBillsByBillId(Long billId);

    /**
     * 查询账单列表
     * 
     * @param franchiseBills 账单
     * @return 账单集合
     */
    public List<FranchiseBills> selectFranchiseBillsList(FranchiseBills franchiseBills);

    /**
     * 新增账单
     * 
     * @param franchiseBills 账单
     * @return 结果
     */
    public int insertFranchiseBills(FranchiseBills franchiseBills);

    /**
     * 修改账单
     * 
     * @param franchiseBills 账单
     * @return 结果
     */
    public int updateFranchiseBills(FranchiseBills franchiseBills);

    /**
     * 批量删除账单
     * 
     * @param billIds 需要删除的账单主键集合
     * @return 结果
     */
    public int deleteFranchiseBillsByBillIds(Long[] billIds);

    /**
     * 删除账单信息
     * 
     * @param billId 账单主键
     * @return 结果
     */
    public int deleteFranchiseBillsByBillId(Long billId);

    FranchiseBills selectByOrderNo(String billNo);      //支付宝 查询订单信息

    void updateById(FranchiseBills orders);          //支付宝  更新订单状态

    Map<String, Object> getBillSummary(String startDate, String endDate, String status);

    /**
     * 获取月度收入趋势数据
     */
    List<Map<String, Object>> getMonthlyAmountTrend(String startDate, String endDate, String status);

    /**
     * 获取账单状态分布数据
     */
    List<Map<String, Object>> getBillStatusDistribution(String startDate, String endDate);

    /**
     * 获取套餐销售排行数据
     */
    List<Map<String, Object>> getPackageRanking(String startDate, String endDate);

    /**
     * 获取学校消费排行数据
     */
    List<Map<String, Object>> getSchoolConsumptionRanking(String startDate, String endDate);

}
